package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"week1/client/internal/config"
	"week1/ordersrv/ordersrvclient"
)

type ServiceContext struct {
	Config   config.Config
	OrderRpc ordersrvclient.Ordersrv
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		OrderRpc: ordersrvclient.NewOrdersrv(zrpc.MustNewClient(c.OrderRpc)),
	}
}
